<?php
class twigController extends \Hyang\Controller
{
    // 普通加载成功
   public function indexAction()
   {
        // 封装以后的结果
       $this->_indexAll21();return;

       //$v = $this->view->loadTemplate('Twig/index.html');
       echo $this->view->render('Twig/index.html', array('about' => 'TWig 模板引擎；官网地址：<a href="http://twig.sensiolabs.org/" target="_blank">Twig</a>'));
   }
   private function _indexAll21()
   {
       $this->setVar('about','TWig 模板引擎；官网地址：<a href="http://twig.sensiolabs.org/" target="_blank">Twig</a>');
       $this->setVar('text',function($t){
           return '版本信息：'.$t->getVEVersion();
       });
       $this->render();
   }
   public function _init()
   {
       $this->selfViewParam = array(
           'name' => 'Twig'
       );
   }
}